home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PASWIZ14.ZIP / SOURCE.ZIP / JOYSTICK.PAS < prev    next >
Pascal/Delphi Source File  |  1993-05-26  |  2KB  |  70 lines

  1. {   +----------------------------------------------------------------------+
  2.     |                                                                      |
  3.     |        PasWiz  Copyright (c) 1990-1993  Thomas G. Hanlin III         |
  4.     |             3544 E. Southern Ave. #104,  Mesa, AZ 85204              |
  5.     |                                                                      |
  6.     |                     The Pascal Wizard's Library                      |
  7.     |                                                                      |
  8.     +----------------------------------------------------------------------+
  9.  
  10.  
  11.  
  12. Joystick:
  13.  
  14.    This unit provides joystick support via the BIOS routines. It will work on
  15.    all but the oldest machines. Joystick support was added to the BIOS around
  16.    the time of the ATs, circa 1985.
  17.  
  18. }
  19.  
  20.  
  21.  
  22. UNIT Joystick;
  23.  
  24.  
  25.  
  26. INTERFACE
  27.  
  28.  
  29.  
  30. FUNCTION ButtonA1: Boolean;
  31. FUNCTION ButtonA2: Boolean;
  32. FUNCTION ButtonB1: Boolean;
  33. FUNCTION ButtonB2: Boolean;
  34.  
  35. PROCEDURE Buttons(VAR A1, A2, B1, B2: Boolean);
  36. PROCEDURE Positions(VAR AX, AY, BX, BY: WORD);
  37.  
  38.  
  39.  
  40. { --------------------------------------------------------------------------- }
  41.  
  42.  
  43.  
  44. IMPLEMENTATION
  45.  
  46.  
  47.  
  48. {$F+}
  49.  
  50. { the below routines are in assembly language }
  51.  
  52.  
  53.  
  54. FUNCTION ButtonA1; external;      { whether joystick A, button 1 is pressed }
  55. FUNCTION ButtonA2; external;      { whether joystick A, button 2 is pressed }
  56. FUNCTION ButtonB1; external;      { whether joystick B, button 1 is pressed }
  57. FUNCTION ButtonB2; external;      { whether joystick B, button 2 is pressed }
  58.  
  59. PROCEDURE Buttons(VAR A1, A2, B1, B2: Boolean); external;  { all buttons }
  60. PROCEDURE Positions(VAR AX, AY, BX, BY: WORD); external;   { stick positions }
  61.  
  62.  
  63. {$L JOYSTK}
  64.  
  65.  
  66.  
  67. { ----------------------- initialization code --------------------------- }
  68. BEGIN
  69. END.
  70.